package com.retallife.user.service.Complaint.Impl;

import com.retallife.user.dao.Complaint.ComplaintMapper;
import com.retallife.user.pojo.Complaint.UserComplaintVo;
import com.retallife.user.service.Complaint.ComplaintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComplaintServiceImpl implements ComplaintService {

    @Autowired
    ComplaintMapper complaintMapper;

    /**
     * 查询用户自己的投诉信息
     * @return 投诉的信息
     */
    public List<UserComplaintVo> FindComplaints(String userComplaintName) {
        return complaintMapper.FindComplaints(userComplaintName);
    }

    /**
     * 增加用户提交的投诉信息
     * @param userComplaintVo
     * @return 是否成功
     */
    public int AddComplaints(UserComplaintVo userComplaintVo) {
        return complaintMapper.AddComplaints(userComplaintVo);
    }
}
